package com.fishery.authority.service;

import com.fishery.authority.entity.BaseRoleFunction;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fishery.authority.entity.Function;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hy
 * @since 2021-01-18
 */
@Service
public interface BaseRoleFunctionService extends IService<BaseRoleFunction> {

    /**
     * 通过baseId和baseIdentity查functionId
     *
     * @param baseId
     * @param baseIdentity
     * @return
     */
    List<BaseRoleFunction> findFunctionByBaseIdBaseIdentity(String baseId, Integer baseIdentity);

    /**
     * 通过baseId baseIdentity删除
     * 通过权限Id删除基地用户权限
     * @param baseId
     * @param baseIdentity
     */
    void deleteALLBaseFunctionById(String baseId, Integer baseIdentity);

    /**
     * 基地老板给基地用户授权
     *
     * @param baseId
     * @param baseIdentity
     * @param functionId
     */
    void addBaseRoleFunction(String baseId, Integer baseIdentity, String functionId);
}
